home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / Versions / versionsTest.c next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  752 b   |  38 lines  |  [TEXT/CWIE]

  1. /*
  2.  * Tests for the various ways to test the QuickDraw 3D versions.
  3.  * 
  4.  * Nick Thompson, March 1997.
  5.  */
  6.  
  7. #include <Gestalt.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <time.h>
  11.  
  12.  
  13. #include "QD3D.h"
  14.  
  15. void main(void)
  16. {
  17.     long        gesResult ;
  18.     
  19.     /* check to see if QuickDraw 3D is installed */
  20.     if(Gestalt( gestaltQD3DVersion, &gesResult ) == noErr ) 
  21.     {
  22.         printf("gestalt response is: %08x\n", gesResult ) ;
  23.         
  24.         /*
  25.          *  the version is packaged as a MMMMmmrr 
  26.          *     where the following is 
  27.          *    MMMM - major release version
  28.          *  mm - minor release version
  29.          *    rr - subrelease version
  30.          */
  31.         printf("QuickDraw™ 3D is installed.  Version %d.%d.%d\n",
  32.                     (gesResult >> 16) & 0xffff,
  33.                     (gesResult & 0xff00) >> 8,
  34.                     (gesResult & 0xff)) ;
  35.     }
  36. }
  37.  
  38.